package com.studentmanage.framework.utils;

public class PageSizeUtil {
    public static int formatPage(int page, int size){
        if(page < 1){
            page = 1;
        }
        if(page == 1){
            page = 0;
        }
        if(page > 1){
            page = (page-1)*size;
        }
        return page;
    }
    public static int formatSize(int size){
        if(size <= 0){
            size = 8;
        }
        return size;
    }
}
